import { ApiProperty } from "@nestjs/swagger";
import { Exclude } from "class-transformer";

export class CreateBookDto {
    @ApiProperty({ description: '图书名称' })
    book_name: string;
    @ApiProperty({ description: '图书作者' })
    author:string;
    @ApiProperty({ description: '图书位置', required: false })
    postion:string;
    @ApiProperty({ description: '图书封面', required: false })
    cover:string;
    @ApiProperty({ description: '图书状态', type: 'int' })
    status: number;
    @ApiProperty({ description: '图书简介', required: false })
    describe:string;
    @ApiProperty({ description: '国际图书编号', required: false })
    ISBN:string;
    @ApiProperty({ description: '图书出版社', required: false })
    publisher:string;
    @ApiProperty({ description: '图书出版日期', required: false })
    publish_date:Date;
    @ApiProperty({ description: '图书分类编号' })
    category_id: number;
    @Exclude()
    create_time:Date;
    @Exclude()
    update_time:Date;
    @Exclude()
    delete_time:Date;
    @Exclude()
    category_name: string;
}
